# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ArtifactRegistry.V1.Model.PythonPackage do
  @moduledoc """
  PythonPackage represents a python artifact.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the package was created.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Required. registry_location, project_id, repository_name and python_package forms a unique package name:`projects//locations//repository//pythonPackages/`. For example, "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ python_package:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and python_package:1.0.0" is the python package.
  *   `packageName` (*type:* `String.t`, *default:* `nil`) - Package for the artifact.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time the package was updated.
  *   `uri` (*type:* `String.t`, *default:* `nil`) - Required. URL to access the package. Example: us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
  *   `version` (*type:* `String.t`, *default:* `nil`) - Version of this package.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :packageName => String.t() | nil,
          :updateTime => DateTime.t() | nil,
          :uri => String.t() | nil,
          :version => String.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:name)
  field(:packageName)
  field(:updateTime, as: DateTime)
  field(:uri)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.ArtifactRegistry.V1.Model.PythonPackage do
  def decode(value, options) do
    GoogleApi.ArtifactRegistry.V1.Model.PythonPackage.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ArtifactRegistry.V1.Model.PythonPackage do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
